import request from '@/utils/request'
export function orderDetailList(query) {
  return request({
    url: '/wms/orderDetail',
    method: 'get',
    params: query
  })
}
export function orderDetailfill(data) {
  return request({
    url: '/ntocc-tms-api/orderDetail/fill',
    method: 'put',
    params: data
  })
}
export function uploadTicketImage(data) {
  return request({
    url: '/ntocc-tms-api/orderDetail/uploadTicketImage',
    method: 'put',
    params: data
  })
}
export function CancellationOrder(data) {
  return request({
    url: '/ntocc-tms-api/orderDetail/driverCancelOrder',
    method: 'put',
    params: data
  })
}
export function orderAbnormal(data) {
  return request({
    url: '/arpa-basic-api/orderDetailAbnormal',
    method: 'post',
    params: data
  })
}
export function deleteDetail(data) {
  return request({
    url: `/ntocc-tms-api/orderDetail`,
    method: 'delete',
    params: {
      codes: data
    }
  })
}
export function extraAddOrderDetail(data) {
  return request({
    url: '/ntocc-tms-api/orderDetail/extraAddOrderDetail',
    method: 'put',
    params: data
  })
}
export function OrderDetails(code) {
  return request({
    url: `/ntocc-tms-api/orderDetail/${code}`,
    method: 'get'
  })
}
export function vehicle(query) {
  return request({
    url: '/arpa-basic-api/vehicle',
    method: 'get',
    params: query
  })
}
export function reportTransportWaybill(data) {
  return request({
    url: '/ntocc-tms-api/report/reportTransportWaybill',
    method: 'post',
    params: {
      code: data
    }
  })
}
export function reportTransportFund(data) {
  return request({
    url: '/ntocc-tms-api/report/reportTransportFund',
    method: 'post',
    params: {
      code: data
    }
  })
}
export function rejectOrderDetail(data) {
  return request({
    url: '/ntocc-tms-api/orderDetail/rejectOrderDetail',
    method: 'put',
    params: data
  })
}
export function orderHandle(data) {
  return request({
    url: '/ntocc-tms-api/orderDetail/orderHandle',
    method: 'put',
    params: data
  })
}
export function calculateOrderDetailPC(data) {
  return request({
    url: '/ntocc-tms-api/orderDetail/calculateOrderDetailPC',
    method: 'put',
    params: {
      codes: data
    }
  })
}
export function driverListOrder(query) {
  return request({
    url: '/arpa-basic-api/driverCancelOrder',
    method: 'get',
    params: query
  })
}
export function AbnormalList(query) {
  return request({
    url: '/arpa-basic-api/orderDetailAbnormal',
    method: 'get',
    params: query
  })
}
export function handleAbnormal(query) {
  return request({
    url: '/arpa-basic-api/orderDetailAbnormal/handle',
    method: 'post',
    params: query
  })
}
export function orderDetailHandlePageList(query) {
  return request({
    url: '/ntocc-tms-api/orderDetail/orderDetailHandlePageList',
    method: 'get',
    params: query
  })
}

export function orderHandlePC(data) {
  return request({
    url: '/ntocc-tms-api/orderDetail/orderHandlePC',
    method: 'put',
    data
  })
}
export function calculateOrderDetail(data) {
  return request({
    url: '/ntocc-tms-api/orderDetail/calculateOrderDetail',
    method: 'put',
    params: data
  })
}
export function orderHandleEditSubmit(data) {
  return request({
    url: '/ntocc-tms-api/orderDetail/orderHandleEditSubmit',
    method: 'put',
    params: data
  })
}

export function orderDetailInfoLoadAndUnloadConfirm(query) {
  return request({
    url: '/ntocc-tms-api/orderDetail/orderDetailInfoLoadAndUnloadConfirm',
    method: 'get',
    params: {
      code: query
    }
  })
}
export function shipperConfirmUnLoading(data) {
  return request({
    url: '/ntocc-tms-api/orderDetail/shipperConfirmUnLoading',
    method: 'put',
    params: data
  })
}
export function shipperConfirmLoading(data) {
  return request({
    url: '/ntocc-tms-api/orderDetail/shipperConfirmLoading',
    method: 'put',
    params: data
  })
}
export function applicationForPayment(data) {
  return request({
    url: '/ntocc-tms-api/orderDetail/applicationForPayment',
    method: 'put',
    params: {
      codes: data
    }
  })
}
// 分配油点
export function Oilpoint(data) {
  return request({
    url: '/ntocc-tms-api/finance/singleOil',
    method: 'post',
    params: data
  })
}
// 单笔打款
export function CashPayment(data) {
  return request({
    url: '/ntocc-tms-api/finance/singlePayment',
    method: 'post',
    params: data
  })
}

export function remitDefinite(query) {
  return request({
    url: '/ntocc-tms-api/remitDefinite',
    method: 'get',
    params: query
  })
}

export function orderDetailFinish(data) {
  return request({
    url: '/ntocc-tms-api/orderDetail/orderDetailFinish',
    method: 'put',
    params: data
  })
}

// 财务打款 驳回
export function financeReject(data) {
  return request({
    url: `/ntocc-tms-api/finance/reject`,
    method: 'put',
    params: data
  })
}
// 批量打款
export function batchPayment(data) {
  return request({
    url: '/ntocc-tms-api/finance/batchPayment',
    method: 'post',
    params: data
  })
}

// 回单签收
export function detailReceiptReturn(data) {
  return request({
    url: `/ntocc-tms-api/orderDetail/detailPaperReturns`,
    method: 'put',
    params: {
      codes: data
    }
  })
}
